﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using YJKRGeometry;

namespace HangerSupport
{
	public class XYComparer : IComparer<XYZ>
	{
		public int Compare(XYZ lhv, XYZ rhv)
		{
			bool flag = Geometry.IsEqual(lhv.Y, rhv.Y);
			if (flag)
			{
				bool flag2 = Geometry.IsEqual(lhv.X, rhv.X);
				if (flag2)
				{
					return 0;
				}
				bool flag3 = Geometry.LessThan(lhv.X, rhv.X);
				if (flag3)
				{
					return -1;
				}
			}
			else
			{
				bool flag4 = Geometry.LessThan(lhv.Y, rhv.Y);
				if (flag4)
				{
					return -1;
				}
			}
			return 1;
		}
	}
}
